package com.tianqu.tms.www.transfer.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

import com.tianqu.tms.core.base.Logger;
import com.tianqu.tms.core.base.TmsAjaxAction;
import com.tianqu.tms.core.base.UserContext;
import com.tianqu.tms.core.exception.TmsException;
import com.tianqu.tms.entity.TransferFinanceInfo;

public class TransferRgGetPayAjaxAction extends TmsAjaxAction {
	private Logger logger = Logger.getLogger(TransferRgGetPayAjaxAction.class);
	@Override
	public void process(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response,
			UserContext uc) throws TmsException {
		logger.debug(this.getClass().getName() + "#execute was called.");
		String serial = request.getParameter("serial");
		
		TransferFinanceInfo finance = new TransferFinanceInfo();
		finance = finance.findFinanceInfoByserial(serial);
		
		String transferPrice = String.valueOf(finance.getTransferPrice());
		String transferPriceS = "";
		if(finance.getTransferPriceDate()!=null)
		{
			transferPriceS = transferPrice+"（已缴费）";
		}else{
			transferPriceS = "（未缴费）";
		}
		String str = transferPrice+","+transferPriceS;
		responseValues(response, str, TEXT);
		logger.debug(this.getClass().getName() + "#execute was completed.");

	}

}
